package com.example.thornchg.yc_plane_game;

import org.cocos2d.actions.instant.CCCallFunc;
import org.cocos2d.actions.interval.CCDelayTime;
import org.cocos2d.actions.interval.CCSequence;
import org.cocos2d.layers.CCLayer;
import org.cocos2d.layers.CCScene;
import org.cocos2d.nodes.CCDirector;
import org.cocos2d.nodes.CCNode;
import org.cocos2d.nodes.CCSprite;

class LogoLayer extends CCLayer {
    public LogoLayer() {
        CCSprite ccSprite=CCSprite.sprite("logo.png");
        ccSprite.setAnchorPoint(0,0);
        addChild(ccSprite);
        CCDelayTime ccDelayTime=CCDelayTime.action(2f);
        CCCallFunc ccCallFunc=CCCallFunc.action(this,"startReady");
        CCSequence ccSequence=CCSequence.actions(ccDelayTime,ccCallFunc);
        runAction(ccSequence);
    }
    public void startReady(){
        CCScene ccScene=CCScene.node();
        ccScene.addChild(new StartReadyLayer());
        CCDirector.sharedDirector().runWithScene(ccScene);
    }
}
